<?php
// +----------------------------------------------------------------------
// | Copyright © Sogu Technologies Co. Ltd 2018-2050 All rights reserved.
// +----------------------------------------------------------------------
// | File name: UserWechat.php
// +----------------------------------------------------------------------
// | Author: liuju
// +----------------------------------------------------------------------
// | Description:  用户微信关联
// +----------------------------------------------------------------------
// | Others: 其他内容的说明
// +----------------------------------------------------------------------
// | History: 修改历史记录列表，每条修改记录应包含修改日期、修改者及修改内容简述
// +----------------------------------------------------------------------
// | 1.Date: 2018-12-29 Author: liuju Modification: 创建
// +----------------------------------------------------------------------

namespace App\Models;


use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\UserWechat
 *
 * @property int $id
 * @property int $user_id 用户id
 * @property string $openid 微信id
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property-read mixed $user
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserWechat newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserWechat newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserWechat query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserWechat whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserWechat whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserWechat whereOpenid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserWechat whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserWechat whereUserId($value)
 * @mixin \Eloquent
 * @property int|null $uid 用户id, null为未绑定状态
 * @property string $unionid unionid
 * @property string $nickname 昵称
 * @property int $gender 性别值为1时是男性，值为2时是女性，值为0时是未知
 * @property string $city 城市
 * @property string $province 省份
 * @property string $country 国家
 * @property string $head 用户头像
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserWechat whereCity($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserWechat whereCountry($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserWechat whereGender($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserWechat whereHead($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserWechat whereNickname($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserWechat whereProvince($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserWechat whereUid($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserWechat whereUnionid($value)
 */
class UserWechat  extends Model
{

    //平台用户与微信是否绑定
    const BIND_STATUS_ONE = 1; //未绑定
    const BIND_STATUS_TWO = 2; //已绑定

    /**
     * 定义不允许自动填充的字段
     * @var array
     */
    protected $guarded = [
        'id',
        'uid',
    ];


}